| Module | WebmasterTools::Routing::MapperExtensions |
| In: |
lib/webmaster_tools/routing.rb
|
Usage:
ActionController::Routing::Routes.draw do |map|
map.webmaster_verification
end
# File lib/webmaster_tools/routing.rb, line 25
25: def webmaster_verification
26: add_google_routes
27: add_yahoo_routes
28: add_live_route
29: end
Usage:
ActionController::Routing::Routes.draw do |map|
map.xml_sitemap
end
Adds a route for /sitemap.xml
# File lib/webmaster_tools/routing.rb, line 12
12: def xml_sitemap
13: @set.add_route("/sitemap.xml", {:controller => "webmaster_tools/sitemaps", :action => "index", :format => "xml"})
14: WebmasterTools::Sitemaps.model_sitemaps.each do |model|
15: @set.add_route("/#{model.to_s.pluralize}_sitemap.xml", {:controller => "webmaster_tools/sitemaps", :action => "model", :format => "xml", :model => model.to_s})
16: end
17: end